home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / c / restracklib_0_2.lha / ResTrackLib / open.c < prev    next >
C/C++ Source or Header  |  1994-07-31  |  1KB  |  68 lines

  1. /* open.c */
  2.  
  3. #include <stdio.h>
  4. #include <dos/dos.h>
  5. #include <clib/dos_protos.h>
  6. #ifdef REGARGS
  7. #   include <pragmas/dos_pragmas.h>
  8.  
  9. extern struct Library * DOSBase;
  10. #endif
  11.  
  12. #include "restrack_intern.h"
  13.  
  14.  
  15. /*****************************************************************************
  16.  
  17.     NAME
  18.     __rtl_Open
  19.  
  20.     SYNOPSIS
  21.     BPTR __rtl_Open (STRPTR name, long mode, const char * file, int line);
  22.  
  23.     FUNCTION
  24.     Stub for Open()
  25.  
  26. ******************************************************************************/
  27.  
  28. BPTR __rtl_Open (STRPTR name, long mode, const char * file, int line)
  29. {
  30.     BPTR fh;
  31.  
  32.     if ( (fh = Open (name, mode)) )
  33.     CHECK_ADD_RN(RTL_DOS,RTLRT_Open,fh,0);
  34.  
  35.     return (fh);
  36. } /* __rtl_Open */
  37.  
  38.  
  39. /*****************************************************************************
  40.  
  41.     NAME
  42.     __rtl_Close
  43.  
  44.     SYNOPSIS
  45.     LONG __rtl_Close (BPTR fh);
  46.  
  47.     FUNCTION
  48.     Stub for Close().
  49.  
  50. ******************************************************************************/
  51.  
  52. LONG __rtl_Close (BPTR fh, const char * file, int line)
  53. {
  54.     LONG success = FALSE;
  55.     ResourceNode * node;
  56.  
  57.     CHECK_REM_RN(fh,RTLRT_Open,Close,success=Close(fh),RTL_DOS,"(%p)",fh)
  58.  
  59.     return (success);
  60. } /* __rtl_Close */
  61.  
  62.  
  63. NRT_RET(LONG,Close,(BPTR fh),(fh))
  64. NRT_RET(BPTR,Lock,(STRPTR name, long type),(name,type))
  65.  
  66.  
  67. /* END open.c */
  68.